<template>
	<view class="content_exa" v-if="userInfo.membe_id">
		<u-navbar :autoBack="true" bgColor="rgba(0,0,0,0)" :fixed="true" @click-left="$back" ></u-navbar>
		
		<image :src="'/images/qbg_02.png' | formatImgUrl" class="bei" mode=""></image>
		<view class="neibox">
			
			<view v-if="userInfo.writer_apply.status==2">
				<view class="title">
					审核未通过<br>
					请补正后再认证
				</view>
				<view class="bibox">
					<view class="bititle">
						上传时间
					</view>
					<view class="biput">
						{{userInfo.writer_apply.create_time}}
					</view>
				</view>
				
				<view class="bibox">
					<view class="bititle">
						拒绝理由
					</view>
					<view class="biput">
						{{userInfo.writer_apply.refuse_msg}}
					</view>
				</view>
				
				<!-- create_time -->
				<view class="xubox">
					<view class="xuztxt">
						写手申请未通过理由<br>
					</view>
					
					<view class="xuztxt">
						1.例文不符合要求。如果您上传的例文不符合我们的要求，我们将驳回申请。如果您上传的例文与您填写的风格不符，我们也讲驳回申请。
					</view>
					<view class="xuztxt">
						2.信息不完整。如果您在填写时漏掉了一些重要信息，我们将驳回申请。
					</view>
					<view class="xuztxt">
						3.例文存在其他问题。如果您上传的例文系AI创作，或涉嫌抄袭、洗稿、非本人创作等，我们将驳回申请。
					</view>
					<view class="xuztxt">
						这些是可能的驳回理由，具体原因因实际情况而异。
					</view>
				</view>
				
				
			</view>
			<view v-else >
				<view class="title" >
					{{userInfo.writer_apply.status_label}}<br>
					进行写手认证！
				</view>

				<view class="bibox">
					<view class="bititle">
						笔龄
					</view>
					<view class="biput">
						{{userInfo.writer_apply.pen_age}}
					</view>
				</view>
				
				<view class="bibox">
					<view class="bititle">
						佣金分成
					</view>
					<view class="biput">
						90%
					</view>
				</view>
				
				<view class="bibox">
					<view class="bititle">
						实际年龄
					</view>
					<view class="biput">
						{{userInfo.writer_apply.age_str}}
					</view>
				</view>
				
				<view class="bibox">
					<view class="bititle">
						作品上传
					</view>
					<view class="biput">
						至多三张
					</view>
				</view>
				<view class="picbox">
					<image :src="item | formatImgUrl" mode="aspectFill" class="uppic" v-for="item in userInfo.writer_apply.img" @click="$common.previewImage(item,userInfo.writer_apply.img)"></image>
				</view>
				<view class="xubox">
					<view class="xuztxt">
						认证说明:<br>
						开动账号的的写手功能认证，可获得平台接单等相应权限，
						写手可通过此功能功能获得收益。
					</view>
					<view class="xuztxt">
						如何开通:<br>
						用户开通写手认证需要填写相应信息上传，平台审核完成后即可开启写手权限。
					</view>
					<view class="xuztxt">
						申请时长:<br>
						我们会在一到三个工作日内对您提交的信息进行审核，审核通过后将发送系统消息通知您。
					</view>
				</view>
			</view>
			
		</view>
		
		
		<view class="bomt" v-if="userInfo.writer_apply.status==2">
			<view class="apply" @click="$go('/pages/user/attestation')">
				再次申请
			</view>
		</view>
		

	</view>
</template>
<script>
	
	export default {
		data() {
			return {
				userInfo: {},
				paddingBottomHeight: 0, //苹果X以上手机底部适配高度
				fileList: []
			}
		},
		onLoad() {

		},
		getData_s(n){
			// console.log(n*1000,77777777777777);
			let now = new Date(n*1000),
			    y = now.getFullYear(),
			    m = now.getMonth() + 1,
			    d = now.getDate();
			  return y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d) + " " + now.toTimeString().substr(0, 8);
		},
		onShow() {
			this.getUserInfo()
		},
		methods: {
			getUserInfo() {
				this.$api.default.request('user/userInfo',{},'GET',false).then((res) => {
					if (res.code) {
						this.userInfo = res.user
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		background: rgba(242, 245, 242, 1);
	}

	.content_exa {
		position: relative;
		padding: 204rpx 0 0;
		padding-top: 154px;
		
		.bomt{
			position: fixed;
			bottom: 0px;
			left: 0px;
			width: 100%;
			height: 60px;
			opacity: 1;
			background: #FFFFFF;
			box-shadow: 0px -4px 10px 0px rgba(69, 196, 176, 0.2);
			.apply{
			
				width: 315px;
				height: 40px;
				border-radius: 8px;
				opacity: 1;
				background: #3D3D3D;
				color: #fff;
				text-align: center;
				margin: 0 auto;
				line-height: 40px;
				margin-top: 10px
			};
		}

		.bei {
			width: 100%;
			height: 100vh;
			position: fixed;
			left: 0;
			top: 0;
			z-index: -1;
		}

		.neibox {
			padding: 0 70rpx;

			.title {
				font-size: 72rpx;
				font-weight: bold;
				letter-spacing: 0px;
				line-height: 104rpx;
				padding-bottom: 52rpx;
				color: #45C4B0;
			}


			.bibox:nth-child(5) {
				border: none !important;
			}

			.bibox {
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 80rpx;
				border-bottom: 1px solid rgba(61, 61, 61, 0.1);

				.bititle {
					font-size: 28rpx;
					font-weight: bold;
					letter-spacing: 0px;
					color: #3D3D3D;
				}

				.biput {
					font-size: 28rpx;
					color: #3d3d3d;
					width: 460rpx;
				
					text-align: right;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
					
				}
			}

			.picbox {
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding-top: 20rpx;

				.uppic {
					width: 180rpx;
					height: 184rpx;
					border-radius: 4px;
				}
			}

			.xubox {
				padding-top: 45rpx;
			}

			.xuztxt {
				padding-bottom: 20rpx;
				line-height: 28rpx;
				font-size: 20rpx;
				font-weight: normal;
				letter-spacing: 0em;
				color: #999999;
			}
		}

		.dibox {
			position: fixed;
			left: 0;
			bottom: 0;
			width: 100%;
			z-index: 222;
			background-color: #ffffff;
			padding: 20rpx 0;

			.zaibox {
				width: 630rpx;
				height: 80rpx;
				border-radius: 12px;
				background: #3D3D3D;
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin: 0 auto 10rpx;

				.zaileft {
					padding: 0 20rpx;

					.dbox {
						display: flex;
						align-items: center;

						.zaititle {

							font-size: 28rpx;
							font-weight: bold;
							background: linear-gradient(293deg, #45C4B0 -5%, #56E8B5 128%);
							-webkit-background-clip: text;
							-webkit-text-fill-color: transparent;
							background-clip: text;
							text-fill-color: transparent;

						}

						.text {
							font-size: 28rpx;
							font-weight: bold;
							color: #FFFFFF;
							padding-left: 8rpx;
						}
					}

					.zaitxt {
						font-size: 20rpx;
						font-weight: normal;
						letter-spacing: 0px;
						color: #999999;
					}
				}

				.que {
					width: 190rpx;
					height: 80rpx;
					border-radius: 10px;
					opacity: 1;
					background: #45C4B0;
					font-size: 24rpx;
					font-weight: bold;
					color: #FFFFFF;
					text-align: center;
					line-height: 80rpx;
				}
			}

			.xiebox {
				display: flex;
				align-items: center;
				justify-content: center;
				padding-bottom: 10rpx;
				.xietxt {
					font-size: 20rpx;
					font-weight: bold;
					color: #999999;

					text {
						font-size: 20rpx;
						font-weight: bold;
						color: #45C4B0;
						padding: 0 10rpx;
					}
				}
			}
		}
	}
</style>